package Web;

import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.bio.SocketConnector;
import org.mortbay.jetty.servlet.Context;
import org.mortbay.jetty.servlet.ServletHandler;
import org.mortbay.jetty.servlet.ServletHolder;

import Command.MainCommand;


public class mainWeb {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		 MainCommand mainCommand=null;//new MainCommand();
	     Server server = new Server(8080);
	     Context root = new Context(server,"/",Context.SESSIONS);
	     root.addServlet(new ServletHolder(new MainServlet()), "/*");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/time");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/time1");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/start_listener");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/end_listener");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/start_init");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/stop_init");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/pause_init");
	     root.addServlet(new ServletHolder(new ForeverFrameServlet(mainCommand)), "/search");
	     server.start();
	     server.join();
	}
}
